<form class="layui-form" lay-filter="form" id="form" style="padding: 20px 30px 0 0;">
    <div class="layui-form-item">
        <label class="layui-form-label">分类名称</label>
        <div class="layui-input-inline">
            <input type="text" name="title" lay-verify="required" lay-reqText="分类名称不能为空" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">缩略图</label>
        <button type="button" class="layui-btn layui-btn-sm plupload_btn" id="up_image">选择图片</button>
        <script type="text/html" template>
            <a href="{{ d.params.image || '' }}" target="_blank">
                <img src="{{ d.params.image || '' }}" width="50" class="{{ d.params.image || 'layui-hide' }}">
            </a>
            <input type="hidden" value="{{ d.params.image || '' }}" name="image">
        </script>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">排序</label>
        <div class="layui-input-inline">
            <input type="text" name="position" value="999" lay-verify="number" lay-reqText="排序不只能是数字" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label"></label>
        <div class="layui-input-inline">
            <input type="hidden" name="id" value=""/>
            <input type="hidden" name="parent_id" value=""/>
            <input type="button" lay-submit lay-filter="form-submit" value="确认" class="layui-btn">
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<script language="JavaScript" src="../../../layuiadmin/lib/plupload/plupload.full.min.js"></script>
<script language="JavaScript" src="../../../layuiadmin/lib/plupload/i18n/zh_CN.js"></script>
<script>
    layui.use(['plupload'], function () {
        var plupload = layui.plupload;

        plupload.upload();//初始化图片上传
    })
</script>